#include<bits/stdc++.h>
#include"../BinarySearchTree.hpp"
using namespace std;

vector<int> data1,data2;

int main(){
    clock_t start1,end1,start2,end2;
    ios::sync_with_stdio(false);
    int n,x;
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>x;
        data1.push_back(x);
        data2.push_back(x);
    }

    start1=clock();
    BST_sort(data1);
    end1=clock();

    start2=clock();
    Randomized_BST_sort(data2);
    end2=clock();

    cout<<"The using time of BTS is: "<<end1-start1<<" ms."<<endl;
    cout<<"And the using time of the randomized one is: "<<end2-start2<<" ms"<<endl;
}